﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using mendian;
using DevExpress.XtraGrid.Demos.util;
using DXApplicationTangche.DTO;

namespace DXApplicationTangche.UC.款式选择
{
    public partial class Frm款式导入预览 : DevExpress.XtraEditors.XtraForm
    {
        private List<DTOstyleCategory> list;
        private string categoryId;
        public Frm款式导入预览()
        {
            InitializeComponent();
        }
        public Frm款式导入预览(List<DTOstyleCategory> list,string categoryId)
        {
            InitializeComponent();
            this.list = list;
            this.categoryId = categoryId;
            this.gridControl款式导入.DataSource = this.list;
        }

        private void simpleButton确认导入_Click(object sender, EventArgs e)
        {
            RestCall.PostHttp(URL.接口url + "/style/saveStyleCategoryRelation?categoryId=" + this.categoryId, FunctionHelper.JsonSerialization(this.list));
            this.Close();
        }
    }
}